package com.itheima.day03;

import java.util.Scanner;

public class HomeWork {

    public static void main(String[] args) {


     /*   double nb=7988;
        double  ob=nb-1500;
        double zb=nb*0.8;

        if (ob>zb){
            System.out.println("打折划算!,价格为:"+zb);
        }
        else if (ob<zb){
            System.out.println("以旧换新划算!,价格为:"+ob);
        }else{
            System.out.println("两者都一样!");
        }
*/
     /*    Scanner sc=new Scanner(System.in);

        System.out.println("请输入第一个整数:");
        int a =sc.nextInt();

        System.out.println("请输入第二个整数:");
        int b =sc.nextInt();

        System.out.println("请输入第三个整数:");
        int c =sc.nextInt();

        int temp=a >= b ? b : a;
        int min=temp >= c ? c : temp;

        System.out.println("最小的数是:"+min);
*/

/*

        System.out.println("$$$整存整取定期储蓄业务$$$");
        System.out.println("存期"+"\t"+"年利率（%）");
        System.out.println("一年"+"\t"+" 2.25");
        System.out.println("两年"+"\t"+" 2.7");
        System.out.println("三年"+"\t"+" 3.25");
        System.out.println("五年"+"\t"+" 3.6");
        Scanner sc=new Scanner(System.in);


        System.out.println("请输入存款金额:");
        double money=sc.nextInt();

        if (money>=1000){

            System.out.println("请输入存款年限:");
            int year=sc.nextInt();
            double suMoney;
            switch(year){
                case 1:
                    suMoney=money+money*0.025*year;
                    System.out.println("一年获得的本息金额:"+suMoney+"元");
                    break;
                case 2:
                    suMoney=money+money*0.027*year;
                    System.out.println("两年获得的本息金额:"+suMoney+"元");
                    break;
                case 3:
                    suMoney=money+money*0.0325*year;
                    System.out.println("三年获得的本息金额:"+suMoney+"元");
                    break;
                case 5:
                    suMoney=money+money*0.036*year;
                    System.out.println("五年获得的本息金额:"+suMoney+"元");
                    break;
                default:
                    System.out.println("输入有误!");
                    break;
            }
        }else{
            System.out.println("金额不足,无法参与!");
        }
*/


/* Scanner sc=new Scanner(System.in);

        while(true){

            System.out.println("是否会员?(0:普通顾客，1:会员):");
            int a =sc.nextInt();

            if (a==0 || a==1){
                System.out.println("请输入你消费的总金额:");
                double cost=sc.nextInt();
                if(a==0){
                    if (0<=cost && cost<100){
                        System.out.println("您需要支付"+cost+"元");
                    }else if (cost>=100){
                        cost*=0.9;
                        System.out.println("您需要支付"+cost+"元");
                    }else{
                        System.out.println("您输入有误,请正确输入!");
                    }
                //    return;
                }
                if (a==1){
                    if (cost>=0 && cost<200){
                        cost*=0.8;
                        System.out.println("您需要支付"+cost+"元");
                    }else if (cost >= 200){
                        cost*=0.75;
                        System.out.println("您需要支付"+cost+"元");
                    }else{
                        System.out.println("您输入有误,请正确输入!");
                    }
                  //  return;
                }

            }else{
                System.out.println("您输入有误,请正确输入!");
            }
        }*/

/*

       for (int i=0;i<3;i++){
           System.out.println("制定出");
       }
*/
/*
       int year=2019;
       while(year>=1949){
           year-=12;
           System.out.println(year+"年是猪年");
       }*/

        for (int i = 1988; i <= 2019; i++) {

            if ((i % 4==0 && i %100 != 0) || i % 400==0){

                System.out.println(i+"是闰年..");
            }
            /*else{
                System.out.println(i+"是平年..");
            }*/

        }





    }
}
